package com.ericsson.enap.modules.procLog.job;

import com.ericsson.common.quartz.job.MainJob;
import com.ericsson.common.quartz.job.ManualQuartzJob;
import com.ericsson.common.quartz.service.QuartzTableManager;
import com.ericsson.enap.modules.procLog.task.ImsBossKpiTask;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Lazy;
import org.springframework.stereotype.Component;

/**
 * @description: Boss-KPi 五分钟粒度
 * @author: yanghai
 * @create: 2021-05-25
 */
@Lazy(true)
@Component
public class ImsBossKpiJob implements MainJob  {
    @Autowired
    private QuartzTableManager quartzTableManager;
    @Autowired
    private ImsBossKpiTask imsBossKpiTask;

    String jobName="imsBossKpiJob";


    @Override
    public void doTask() {
        System.out.println("BossKpiJob start.....");
//        imsBossKpiTask.execute();
        quartzTableManager.addManualTaskJob(jobName,jobName,jobName,jobName,
                ManualQuartzJob.class,"0 0/5 * * * ?",imsBossKpiTask);
    }
}
